package com.bhkj.pdjhforotherapp.core.printutilspjq;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.bhkj.pdjhforotherapp.R;

/**
 * 监听usb 拔插事件
 */
public class UsbReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();
        if ("android.hardware.usb.action.USB_DEVICE_ATTACHED".equals(action) && !context.getResources().getBoolean(R.bool.isQhj)) {
            PrintManagerPjq.getInstance().connectPrintDevice();
        }
    }
}
